home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / prim / process.elc.z / process.elc
Emacs Compiled Lisp  |  1998-05-21  |  10.2 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v20 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 14 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 75 73 74 69 6e 62 |piled by| justinb|
|00000020| 40 65 62 6f 6e 79 2e 63 | 72 61 79 2e 63 6f 6d 20 |@ebony.c|ray.com |
|00000030| 6f 6e 20 54 68 75 20 4a | 61 6e 20 32 32 20 31 34 |on Thu J|an 22 14|
|00000040| 3a 34 36 3a 32 35 20 31 | 39 39 38 0a 3b 3b 3b 20 |:46:25 1|998.;;; |
|00000050| 66 72 6f 6d 20 66 69 6c | 65 20 2f 68 6f 6d 65 2f |from fil|e /home/|
|00000060| 61 73 70 65 6e 30 37 2f | 6a 75 73 74 69 6e 62 2f |aspen07/|justinb/|
|00000070| 72 6f 6f 74 73 2f 66 72 | 65 65 77 61 72 65 2f 78 |roots/fr|eeware/x|
|00000080| 65 6d 61 63 73 2f 78 65 | 6d 61 63 73 2d 32 30 2e |emacs/xe|macs-20.|
|00000090| 33 2f 6c 69 73 70 2f 70 | 72 69 6d 2f 70 72 6f 63 |3/lisp/p|rim/proc|
|000000a0| 65 73 73 2e 65 6c 0a 3b | 3b 3b 20 65 6d 61 63 73 |ess.el.;|;; emacs|
|000000b0| 20 76 65 72 73 69 6f 6e | 20 32 30 2e 33 20 22 56 | version| 20.3 "V|
|000000c0| 61 74 69 63 61 6e 20 43 | 69 74 79 22 20 58 45 6d |atican C|ity" XEm|
|000000d0| 61 63 73 20 20 4c 75 63 | 69 64 2e 0a 3b 3b 3b 20 |acs Luc|id..;;; |
|000000e0| 62 79 74 65 63 6f 6d 70 | 20 76 65 72 73 69 6f 6e |bytecomp| version|
|000000f0| 20 32 2e 32 35 20 58 45 | 6d 61 63 73 3b 20 32 32 | 2.25 XE|macs; 22|
|00000100| 2d 4d 61 72 2d 39 36 2e | 0a 3b 3b 3b 20 6f 70 74 |-Mar-96.|.;;; opt|
|00000110| 69 6d 69 7a 61 74 69 6f | 6e 20 69 73 20 6f 6e 2e |imizatio|n is on.|
|00000120| 0a 3b 3b 3b 20 74 68 69 | 73 20 66 69 6c 65 20 75 |.;;; thi|s file u|
|00000130| 73 65 73 20 6f 70 63 6f | 64 65 73 20 77 68 69 63 |ses opco|des whic|
|00000140| 68 20 64 6f 20 6e 6f 74 | 20 65 78 69 73 74 20 69 |h do not| exist i|
|00000150| 6e 20 45 6d 61 63 73 20 | 31 39 2e 0a 0a 28 69 66 |n Emacs |19...(if|
|00000160| 20 28 61 6e 64 20 28 62 | 6f 75 6e 64 70 20 27 65 | (and (b|oundp 'e|
|00000170| 6d 61 63 73 2d 76 65 72 | 73 69 6f 6e 29 0a 09 20 |macs-ver|sion).. |
|00000180| 28 6f 72 20 28 61 6e 64 | 20 28 62 6f 75 6e 64 70 |(or (and| (boundp|
|00000190| 20 27 65 70 6f 63 68 3a | 3a 76 65 72 73 69 6f 6e | 'epoch:|:version|
|000001a0| 29 20 65 70 6f 63 68 3a | 3a 76 65 72 73 69 6f 6e |) epoch:|:version|
|000001b0| 29 0a 09 20 20 20 20 20 | 28 73 74 72 69 6e 67 2d |).. |(string-|
|000001c0| 6c 65 73 73 70 20 65 6d | 61 63 73 2d 76 65 72 73 |lessp em|acs-vers|
|000001d0| 69 6f 6e 20 22 32 30 22 | 29 29 29 0a 20 20 20 20 |ion "20"|))). |
|000001e0| 28 65 72 72 6f 72 20 22 | 60 70 72 6f 63 65 73 73 |(error "|`process|
|000001f0| 2e 65 6c 27 20 77 61 73 | 20 63 6f 6d 70 69 6c 65 |.el' was| compile|
|00000200| 64 20 66 6f 72 20 45 6d | 61 63 73 20 32 30 22 29 |d for Em|acs 20")|
|00000210| 29 0a 0a 28 6f 72 20 28 | 62 6f 75 6e 64 70 20 27 |)..(or (|boundp '|
|00000220| 63 75 72 72 65 6e 74 2d | 6c 6f 61 64 2d 6c 69 73 |current-|load-lis|
|00000230| 74 29 20 28 73 65 74 71 | 20 63 75 72 72 65 6e 74 |t) (setq| current|
|00000240| 2d 6c 6f 61 64 2d 6c 69 | 73 74 20 6e 69 6c 29 29 |-load-li|st nil))|
|00000250| 0a 0a 0a 23 40 36 36 20 | 53 77 69 74 63 68 20 75 |...#@66 |Switch u|
|00000260| 73 65 64 20 74 6f 20 68 | 61 76 65 20 74 68 65 20 |sed to h|ave the |
|00000270| 73 68 65 6c 6c 20 65 78 | 65 63 75 74 65 20 69 74 |shell ex|ecute it|
|00000280| 73 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 20 61 |s comman|d line a|
|00000290| 72 67 75 6d 65 6e 74 2e | 1f 0a 28 64 65 66 76 61 |rgument.|..(defva|
|000002a0| 72 20 73 68 65 6c 6c 2d | 63 6f 6d 6d 61 6e 64 2d |r shell-|command-|
|000002b0| 73 77 69 74 63 68 20 22 | 2d 63 22 20 28 23 24 20 |switch "|-c" (#$ |
|000002c0| 2e 20 36 30 30 29 29 0a | 23 40 36 34 31 20 53 74 |. 600)).|#@641 St|
|000002d0| 61 72 74 20 61 20 70 72 | 6f 67 72 61 6d 20 69 6e |art a pr|ogram in|
|000002e0| 20 61 20 73 75 62 70 72 | 6f 63 65 73 73 2e 20 20 | a subpr|ocess. |
|000002f0| 52 65 74 75 72 6e 20 74 | 68 65 20 70 72 6f 63 65 |Return t|he proce|
|00000300| 73 73 20 6f 62 6a 65 63 | 74 20 66 6f 72 20 69 74 |ss objec|t for it|
|00000310| 2e 0a 41 72 67 73 20 61 | 72 65 20 4e 41 4d 45 20 |..Args a|re NAME |
|00000320| 42 55 46 46 45 52 20 43 | 4f 4d 4d 41 4e 44 20 26 |BUFFER C|OMMAND &|
|00000330| 72 65 73 74 20 43 4f 4d | 4d 41 4e 44 2d 41 52 47 |rest COM|MAND-ARG|
|00000340| 53 2e 0a 4e 41 4d 45 20 | 69 73 20 6e 61 6d 65 20 |S..NAME |is name |
|00000350| 66 6f 72 20 70 72 6f 63 | 65 73 73 2e 20 20 49 74 |for proc|ess. It|
|00000360| 20 69 73 20 6d 6f 64 69 | 66 69 65 64 20 69 66 20 | is modi|fied if |
|00000370| 6e 65 63 65 73 73 61 72 | 79 20 74 6f 20 6d 61 6b |necessar|y to mak|
|00000380| 65 20 69 74 20 75 6e 69 | 71 75 65 2e 0a 42 55 46 |e it uni|que..BUF|
|00000390| 46 45 52 20 69 73 20 74 | 68 65 20 62 75 66 66 65 |FER is t|he buffe|
|000003a0| 72 20 6f 72 20 28 62 75 | 66 66 65 72 2d 6e 61 6d |r or (bu|ffer-nam|
|000003b0| 65 29 20 74 6f 20 61 73 | 73 6f 63 69 61 74 65 20 |e) to as|sociate |
|000003c0| 77 69 74 68 20 74 68 65 | 20 70 72 6f 63 65 73 73 |with the| process|
|000003d0| 2e 0a 20 50 72 6f 63 65 | 73 73 20 6f 75 74 70 75 |.. Proce|ss outpu|
|000003e0| 74 20 67 6f 65 73 20 61 | 74 20 65 6e 64 20 6f 66 |t goes a|t end of|
|000003f0| 20 74 68 61 74 20 62 75 | 66 66 65 72 2c 20 75 6e | that bu|ffer, un|
|00000400| 6c 65 73 73 20 79 6f 75 | 20 73 70 65 63 69 66 79 |less you| specify|
|00000410| 0a 20 61 6e 20 6f 75 74 | 70 75 74 20 73 74 72 65 |. an out|put stre|
|00000420| 61 6d 20 6f 72 20 66 69 | 6c 74 65 72 20 66 75 6e |am or fi|lter fun|
|00000430| 63 74 69 6f 6e 20 74 6f | 20 68 61 6e 64 6c 65 20 |ction to| handle |
|00000440| 74 68 65 20 6f 75 74 70 | 75 74 2e 0a 20 42 55 46 |the outp|ut.. BUF|
|00000450| 46 45 52 20 6d 61 79 20 | 62 65 20 61 6c 73 6f 20 |FER may |be also |
|00000460| 6e 69 6c 2c 20 6d 65 61 | 6e 69 6e 67 20 74 68 61 |nil, mea|ning tha|
|00000470| 74 20 74 68 69 73 20 70 | 72 6f 63 65 73 73 20 69 |t this p|rocess i|
|00000480| 73 20 6e 6f 74 20 61 73 | 73 6f 63 69 61 74 65 64 |s not as|sociated|
|00000490| 0a 20 77 69 74 68 20 61 | 6e 79 20 62 75 66 66 65 |. with a|ny buffe|
|000004a0| 72 0a 54 68 69 72 64 20 | 61 72 67 20 69 73 20 63 |r.Third |arg is c|
|000004b0| 6f 6d 6d 61 6e 64 20 6e | 61 6d 65 2c 20 74 68 65 |ommand n|ame, the|
|000004c0| 20 6e 61 6d 65 20 6f 66 | 20 61 20 73 68 65 6c 6c | name of| a shell|
|000004d0| 20 63 6f 6d 6d 61 6e 64 | 2e 0a 52 65 6d 61 69 6e | command|..Remain|
|000004e0| 69 6e 67 20 61 72 67 75 | 6d 65 6e 74 73 20 61 72 |ing argu|ments ar|
|000004f0| 65 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 73 20 |e the ar|guments |
|00000500| 66 6f 72 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 2e |for the |command.|
|00000510| 0a 57 69 6c 64 63 61 72 | 64 73 20 61 6e 64 20 72 |.Wildcar|ds and r|
|00000520| 65 64 69 72 65 63 74 69 | 6f 6e 20 61 72 65 20 68 |edirecti|on are h|
|00000530| 61 6e 64 6c 65 64 20 61 | 73 20 75 73 75 61 6c 20 |andled a|s usual |
|00000540| 69 6e 20 74 68 65 20 73 | 68 65 6c 6c 2e 1f 0a 28 |in the s|hell...(|
|00000550| 64 65 66 61 6c 69 61 73 | 20 27 73 74 61 72 74 2d |defalias| 'start-|
|00000560| 70 72 6f 63 65 73 73 2d | 73 68 65 6c 6c 2d 63 6f |process-|shell-co|
|00000570| 6d 6d 61 6e 64 20 23 5b | 28 6e 61 6d 65 20 62 75 |mmand #[|(name bu|
|00000580| 66 66 65 72 20 26 72 65 | 73 74 20 61 72 67 73 29 |ffer &re|st args)|
|00000590| 20 22 08 c1 61 ab 88 c2 | c3 0c 0d 0e 06 24 87 c3 | "..a...|.....$..|
|000005a0| 0c 0d 0e 07 0e 08 c9 ca | 0e 06 cb 23 25 87 22 20 |........|...#%." |
|000005b0| 5b 73 79 73 74 65 6d 2d | 74 79 70 65 20 76 61 78 |[system-|type vax|
|000005c0| 2d 76 6d 73 20 61 70 70 | 6c 79 20 73 74 61 72 74 |-vms app|ly start|
|000005d0| 2d 70 72 6f 63 65 73 73 | 20 6e 61 6d 65 20 62 75 |-process| name bu|
|000005e0| 66 66 65 72 20 61 72 67 | 73 20 73 68 65 6c 6c 2d |ffer arg|s shell-|
|000005f0| 66 69 6c 65 2d 6e 61 6d | 65 20 73 68 65 6c 6c 2d |file-nam|e shell-|
|00000600| 63 6f 6d 6d 61 6e 64 2d | 73 77 69 74 63 68 20 6d |command-|switch m|
|00000610| 61 70 63 6f 6e 63 61 74 | 20 69 64 65 6e 74 69 74 |apconcat| identit|
|00000620| 79 20 22 20 22 5d 20 39 | 20 28 23 24 20 2e 20 37 |y " "] 9| (#$ . 7|
|00000630| 31 38 29 5d 29 0a 23 40 | 39 36 31 20 43 61 6c 6c |18)]).#@|961 Call|
|00000640| 20 50 52 4f 47 52 41 4d | 20 73 79 6e 63 68 72 6f | PROGRAM| synchro|
|00000650| 6e 6f 75 73 6c 79 20 69 | 6e 20 73 65 70 61 72 61 |nously i|n separa|
|00000660| 74 65 20 70 72 6f 63 65 | 73 73 2e 0a 54 68 65 20 |te proce|ss..The |
|00000670| 70 72 6f 67 72 61 6d 27 | 73 20 69 6e 70 75 74 20 |program'|s input |
|00000680| 63 6f 6d 65 73 20 66 72 | 6f 6d 20 66 69 6c 65 20 |comes fr|om file |
|00000690| 49 4e 46 49 4c 45 20 28 | 6e 69 6c 20 6d 65 61 6e |INFILE (|nil mean|
|000006a0| 73 20 60 2f 64 65 76 2f | 6e 75 6c 6c 27 29 2e 0a |s `/dev/|null')..|
|000006b0| 49 6e 73 65 72 74 20 6f | 75 74 70 75 74 20 69 6e |Insert o|utput in|
|000006c0| 20 42 55 46 46 45 52 20 | 62 65 66 6f 72 65 20 70 | BUFFER |before p|
|000006d0| 6f 69 6e 74 3b 20 74 20 | 6d 65 61 6e 73 20 63 75 |oint; t |means cu|
|000006e0| 72 72 65 6e 74 20 62 75 | 66 66 65 72 3b 0a 20 6e |rrent bu|ffer;. n|
|000006f0| 69 6c 20 66 6f 72 20 42 | 55 46 46 45 52 20 6d 65 |il for B|UFFER me|
|00000700| 61 6e 73 20 64 69 73 63 | 61 72 64 20 69 74 3b 20 |ans disc|ard it; |
|00000710| 30 20 6d 65 61 6e 73 20 | 64 69 73 63 61 72 64 20 |0 means |discard |
|00000720| 61 6e 64 20 64 6f 6e 27 | 74 20 77 61 69 74 2e 0a |and don'|t wait..|
|00000730| 42 55 46 46 45 52 20 63 | 61 6e 20 61 6c 73 6f 20 |BUFFER c|an also |
|00000740| 68 61 76 65 20 74 68 65 | 20 66 6f 72 6d 20 28 52 |have the| form (R|
|00000750| 45 41 4c 2d 42 55 46 46 | 45 52 20 53 54 44 45 52 |EAL-BUFF|ER STDER|
|00000760| 52 2d 46 49 4c 45 29 3b | 20 69 6e 20 74 68 61 74 |R-FILE);| in that|
|00000770| 20 63 61 73 65 2c 0a 52 | 45 41 4c 2d 42 55 46 46 | case,.R|EAL-BUFF|
|00000780| 45 52 20 73 61 79 73 20 | 77 68 61 74 20 74 6f 20 |ER says |what to |
|00000790| 64 6f 20 77 69 74 68 20 | 73 74 61 6e 64 61 72 64 |do with |standard|
|000007a0| 20 6f 75 74 70 75 74 2c | 20 61 73 20 61 62 6f 76 | output,| as abov|
|000007b0| 65 2c 0a 77 68 69 6c 65 | 20 53 54 44 45 52 52 2d |e,.while| STDERR-|
|000007c0| 46 49 4c 45 20 73 61 79 | 73 20 77 68 61 74 20 74 |FILE say|s what t|
|000007d0| 6f 20 64 6f 20 77 69 74 | 68 20 73 74 61 6e 64 61 |o do wit|h standa|
|000007e0| 72 64 20 65 72 72 6f 72 | 20 69 6e 20 74 68 65 20 |rd error| in the |
|000007f0| 63 68 69 6c 64 2e 0a 53 | 54 44 45 52 52 2d 46 49 |child..S|TDERR-FI|
|00000800| 4c 45 20 6d 61 79 20 62 | 65 20 6e 69 6c 20 28 64 |LE may b|e nil (d|
|00000810| 69 73 63 61 72 64 20 73 | 74 61 6e 64 61 72 64 20 |iscard s|tandard |
|00000820| 65 72 72 6f 72 20 6f 75 | 74 70 75 74 29 2c 0a 74 |error ou|tput),.t|
|00000830| 20 28 6d 69 78 20 69 74 | 20 77 69 74 68 20 6f 72 | (mix it| with or|
|00000840| 64 69 6e 61 72 79 20 6f | 75 74 70 75 74 29 2c 20 |dinary o|utput), |
|00000850| 6f 72 20 61 20 66 69 6c | 65 20 6e 61 6d 65 20 73 |or a fil|e name s|
|00000860| 74 72 69 6e 67 2e 0a 0a | 46 6f 75 72 74 68 20 61 |tring...|Fourth a|
|00000870| 72 67 20 44 49 53 50 4c | 41 59 50 20 6e 6f 6e 2d |rg DISPL|AYP non-|
|00000880| 6e 69 6c 20 6d 65 61 6e | 73 20 72 65 64 69 73 70 |nil mean|s redisp|
|00000890| 6c 61 79 20 62 75 66 66 | 65 72 20 61 73 20 6f 75 |lay buff|er as ou|
|000008a0| 74 70 75 74 20 69 73 20 | 69 6e 73 65 72 74 65 64 |tput is |inserted|
|000008b0| 2e 0a 52 65 6d 61 69 6e | 69 6e 67 20 61 72 67 75 |..Remain|ing argu|
|000008c0| 6d 65 6e 74 73 20 61 72 | 65 20 73 74 72 69 6e 67 |ments ar|e string|
|000008d0| 73 20 70 61 73 73 65 64 | 20 61 73 20 63 6f 6d 6d |s passed| as comm|
|000008e0| 61 6e 64 20 61 72 67 75 | 6d 65 6e 74 73 20 74 6f |and argu|ments to|
|000008f0| 20 50 52 4f 47 52 41 4d | 2e 0a 0a 49 66 20 42 55 | PROGRAM|...If BU|
|00000900| 46 46 45 52 20 69 73 20 | 30 2c 20 60 63 61 6c 6c |FFER is |0, `call|
|00000910| 2d 70 72 6f 63 65 73 73 | 27 20 72 65 74 75 72 6e |-process|' return|
|00000920| 73 20 69 6d 6d 65 64 69 | 61 74 65 6c 79 20 77 69 |s immedi|ately wi|
|00000930| 74 68 20 76 61 6c 75 65 | 20 6e 69 6c 2e 0a 4f 74 |th value| nil..Ot|
|00000940| 68 65 72 77 69 73 65 20 | 69 74 20 77 61 69 74 73 |herwise |it waits|
|00000950| 20 66 6f 72 20 50 52 4f | 47 52 41 4d 20 74 6f 20 | for PRO|GRAM to |
|00000960| 74 65 72 6d 69 6e 61 74 | 65 20 61 6e 64 20 72 65 |terminat|e and re|
|00000970| 74 75 72 6e 73 20 61 20 | 6e 75 6d 65 72 69 63 20 |turns a |numeric |
|00000980| 65 78 69 74 20 73 74 61 | 74 75 73 0a 20 6f 72 20 |exit sta|tus. or |
|00000990| 61 20 73 69 67 6e 61 6c | 20 64 65 73 63 72 69 70 |a signal| descrip|
|000009a0| 74 69 6f 6e 20 73 74 72 | 69 6e 67 2e 0a 49 66 20 |tion str|ing..If |
|000009b0| 79 6f 75 20 71 75 69 74 | 2c 20 74 68 65 20 70 72 |you quit|, the pr|
|000009c0| 6f 63 65 73 73 20 69 73 | 20 6b 69 6c 6c 65 64 20 |ocess is| killed |
|000009d0| 77 69 74 68 20 53 49 47 | 49 4e 54 2c 20 6f 72 20 |with SIG|INT, or |
|000009e0| 53 49 47 4b 49 4c 4c 20 | 69 66 20 79 6f 75 0a 20 |SIGKILL |if you. |
|000009f0| 71 75 69 74 20 61 67 61 | 69 6e 2e 1f 0a 28 64 65 |quit aga|in...(de|
|00000a00| 66 61 6c 69 61 73 20 27 | 63 61 6c 6c 2d 70 72 6f |falias '|call-pro|
|00000a10| 63 65 73 73 20 23 5b 28 | 70 72 6f 67 72 61 6d 20 |cess #[(|program |
|00000a20| 26 6f 70 74 69 6f 6e 61 | 6c 20 69 6e 66 69 6c 65 |&optiona|l infile|
|00000a30| 20 62 75 66 66 65 72 20 | 64 69 73 70 6c 61 79 70 | buffer |displayp|
|00000a40| 20 26 72 65 73 74 20 61 | 72 67 73 29 20 22 c0 c1 | &rest a|rgs) "..|
|00000a50| 5c 6e 0b 0c 0d 0e 06 26 | 06 87 22 20 5b 61 70 70 |\n.....&|.." [app|
|00000a60| 6c 79 20 63 61 6c 6c 2d | 70 72 6f 63 65 73 73 2d |ly call-|process-|
|00000a70| 69 6e 74 65 72 6e 61 6c | 20 70 72 6f 67 72 61 6d |internal| program|
|00000a80| 20 69 6e 66 69 6c 65 20 | 62 75 66 66 65 72 20 64 | infile |buffer d|
|00000a90| 69 73 70 6c 61 79 70 20 | 61 72 67 73 5d 20 37 20 |isplayp |args] 7 |
|00000aa0| 28 23 24 20 2e 20 31 35 | 39 36 29 5d 29 0a 23 40 |(#$ . 15|96)]).#@|
|00000ab0| 39 37 36 20 53 65 6e 64 | 20 74 65 78 74 20 66 72 |976 Send| text fr|
|00000ac0| 6f 6d 20 53 54 41 52 54 | 20 74 6f 20 45 4e 44 20 |om START| to END |
|00000ad0| 74 6f 20 61 20 73 79 6e | 63 68 72 6f 6e 6f 75 73 |to a syn|chronous|
|00000ae0| 20 70 72 6f 63 65 73 73 | 20 72 75 6e 6e 69 6e 67 | process| running|
|00000af0| 20 50 52 4f 47 52 41 4d | 2e 0a 44 65 6c 65 74 65 | PROGRAM|..Delete|
|00000b00| 20 74 68 65 20 74 65 78 | 74 20 69 66 20 66 6f 75 | the tex|t if fou|
|00000b10| 72 74 68 20 61 72 67 20 | 44 45 4c 45 54 45 50 20 |rth arg |DELETEP |
|00000b20| 69 73 20 6e 6f 6e 2d 6e | 69 6c 2e 0a 0a 49 6e 73 |is non-n|il...Ins|
|00000b30| 65 72 74 20 6f 75 74 70 | 75 74 20 69 6e 20 42 55 |ert outp|ut in BU|
|00000b40| 46 46 45 52 20 62 65 66 | 6f 72 65 20 70 6f 69 6e |FFER bef|ore poin|
|00000b50| 74 3b 20 74 20 6d 65 61 | 6e 73 20 63 75 72 72 65 |t; t mea|ns curre|
|00000b60| 6e 74 20 62 75 66 66 65 | 72 3b 0a 20 6e 69 6c 20 |nt buffe|r;. nil |
|00000b70| 66 6f 72 20 42 55 46 46 | 45 52 20 6d 65 61 6e 73 |for BUFF|ER means|
|00000b80| 20 64 69 73 63 61 72 64 | 20 69 74 3b 20 30 20 6d | discard| it; 0 m|
|00000b90| 65 61 6e 73 20 64 69 73 | 63 61 72 64 20 61 6e 64 |eans dis|card and|
|00000ba0| 20 64 6f 6e 27 74 20 77 | 61 69 74 2e 0a 42 55 46 | don't w|ait..BUF|
|00000bb0| 46 45 52 20 63 61 6e 20 | 61 6c 73 6f 20 68 61 76 |FER can |also hav|
|00000bc0| 65 20 74 68 65 20 66 6f | 72 6d 20 28 52 45 41 4c |e the fo|rm (REAL|
|00000bd0| 2d 42 55 46 46 45 52 20 | 53 54 44 45 52 52 2d 46 |-BUFFER |STDERR-F|
|00000be0| 49 4c 45 29 3b 20 69 6e | 20 74 68 61 74 20 63 61 |ILE); in| that ca|
|00000bf0| 73 65 2c 0a 52 45 41 4c | 2d 42 55 46 46 45 52 20 |se,.REAL|-BUFFER |
|00000c00| 73 61 79 73 20 77 68 61 | 74 20 74 6f 20 64 6f 20 |says wha|t to do |
|00000c10| 77 69 74 68 20 73 74 61 | 6e 64 61 72 64 20 6f 75 |with sta|ndard ou|
|00000c20| 74 70 75 74 2c 20 61 73 | 20 61 62 6f 76 65 2c 0a |tput, as| above,.|
|00000c30| 77 68 69 6c 65 20 53 54 | 44 45 52 52 2d 46 49 4c |while ST|DERR-FIL|
|00000c40| 45 20 73 61 79 73 20 77 | 68 61 74 20 74 6f 20 64 |E says w|hat to d|
|00000c50| 6f 20 77 69 74 68 20 73 | 74 61 6e 64 61 72 64 20 |o with s|tandard |
|00000c60| 65 72 72 6f 72 20 69 6e | 20 74 68 65 20 63 68 69 |error in| the chi|
|00000c70| 6c 64 2e 0a 53 54 44 45 | 52 52 2d 46 49 4c 45 20 |ld..STDE|RR-FILE |
|00000c80| 6d 61 79 20 62 65 20 6e | 69 6c 20 28 64 69 73 63 |may be n|il (disc|
|00000c90| 61 72 64 20 73 74 61 6e | 64 61 72 64 20 65 72 72 |ard stan|dard err|
|00000ca0| 6f 72 20 6f 75 74 70 75 | 74 29 2c 0a 74 20 28 6d |or outpu|t),.t (m|
|00000cb0| 69 78 20 69 74 20 77 69 | 74 68 20 6f 72 64 69 6e |ix it wi|th ordin|
|00000cc0| 61 72 79 20 6f 75 74 70 | 75 74 29 2c 20 6f 72 20 |ary outp|ut), or |
|00000cd0| 61 20 66 69 6c 65 20 6e | 61 6d 65 20 73 74 72 69 |a file n|ame stri|
|00000ce0| 6e 67 2e 0a 0a 53 69 78 | 74 68 20 61 72 67 20 44 |ng...Six|th arg D|
|00000cf0| 49 53 50 4c 41 59 50 20 | 6e 6f 6e 2d 6e 69 6c 20 |ISPLAYP |non-nil |
|00000d00| 6d 65 61 6e 73 20 72 65 | 64 69 73 70 6c 61 79 20 |means re|display |
|00000d10| 62 75 66 66 65 72 20 61 | 73 20 6f 75 74 70 75 74 |buffer a|s output|
|00000d20| 20 69 73 20 69 6e 73 65 | 72 74 65 64 2e 0a 52 65 | is inse|rted..Re|
|00000d30| 6d 61 69 6e 69 6e 67 20 | 61 72 67 73 20 61 72 65 |maining |args are|
|00000d40| 20 70 61 73 73 65 64 20 | 74 6f 20 50 52 4f 47 52 | passed |to PROGR|
|00000d50| 41 4d 20 61 74 20 73 74 | 61 72 74 75 70 20 61 73 |AM at st|artup as|
|00000d60| 20 63 6f 6d 6d 61 6e 64 | 20 61 72 67 73 2e 0a 0a | command| args...|
|00000d70| 49 66 20 42 55 46 46 45 | 52 20 69 73 20 30 2c 20 |If BUFFE|R is 0, |
|00000d80| 72 65 74 75 72 6e 73 20 | 69 6d 6d 65 64 69 61 74 |returns |immediat|
|00000d90| 65 6c 79 20 77 69 74 68 | 20 76 61 6c 75 65 20 6e |ely with| value n|
|00000da0| 69 6c 2e 0a 4f 74 68 65 | 72 77 69 73 65 20 77 61 |il..Othe|rwise wa|
|00000db0| 69 74 73 20 66 6f 72 20 | 50 52 4f 47 52 41 4d 20 |its for |PROGRAM |
|00000dc0| 74 6f 20 74 65 72 6d 69 | 6e 61 74 65 0a 61 6e 64 |to termi|nate.and|
|00000dd0| 20 72 65 74 75 72 6e 73 | 20 61 20 6e 75 6d 65 72 | returns| a numer|
|00000de0| 69 63 20 65 78 69 74 20 | 73 74 61 74 75 73 20 6f |ic exit |status o|
|00000df0| 72 20 61 20 73 69 67 6e | 61 6c 20 64 65 73 63 72 |r a sign|al descr|
|00000e00| 69 70 74 69 6f 6e 20 73 | 74 72 69 6e 67 2e 0a 49 |iption s|tring..I|
|00000e10| 66 20 79 6f 75 20 71 75 | 69 74 2c 20 74 68 65 20 |f you qu|it, the |
|00000e20| 70 72 6f 63 65 73 73 20 | 69 73 20 66 69 72 73 74 |process |is first|
|00000e30| 20 6b 69 6c 6c 65 64 20 | 77 69 74 68 20 53 49 47 | killed |with SIG|
|00000e40| 49 4e 54 2c 20 74 68 65 | 6e 20 77 69 74 68 20 53 |INT, the|n with S|
|00000e50| 49 47 4b 49 4c 4c 20 69 | 66 0a 79 6f 75 20 71 75 |IGKILL i|f.you qu|
|00000e60| 69 74 20 61 67 61 69 6e | 20 62 65 66 6f 72 65 20 |it again| before |
|00000e70| 74 68 65 20 70 72 6f 63 | 65 73 73 20 65 78 69 74 |the proc|ess exit|
|00000e80| 73 2e 1f 0a 28 64 65 66 | 61 6c 69 61 73 20 27 63 |s...(def|alias 'c|
|00000e90| 61 6c 6c 2d 70 72 6f 63 | 65 73 73 2d 72 65 67 69 |all-proc|ess-regi|
|00000ea0| 6f 6e 20 23 5b 28 73 74 | 61 72 74 20 65 6e 64 20 |on #[(st|art end |
|00000eb0| 70 72 6f 67 72 61 6d 20 | 26 6f 70 74 69 6f 6e 61 |program |&optiona|
|00000ec0| 6c 20 64 65 6c 65 74 65 | 70 20 62 75 66 66 65 72 |l delete|p buffer|
|00000ed0| 20 64 69 73 70 6c 61 79 | 70 20 26 72 65 73 74 20 | display|p &rest |
|00000ee0| 61 72 67 73 29 20 22 08 | c1 61 ab 85 c2 c3 21 aa |args) ".|.a....!.|
|00000ef0| a0 08 c4 61 ac 85 08 c5 | 61 ab 93 c2 c6 c7 c8 21 |...a....|a......!|
|00000f00| ae 86 c7 c9 21 ae 81 ca | 21 cb 50 21 aa 83 c2 cc |....!...|!.P!....|
|00000f10| 21 1e 0d ce 8e 08 c4 61 | ac 85 08 c5 61 ab 92 0e |!......a|....a...|
|00000f20| 0f 1e 10 d1 0e 12 0e 13 | 0e 0d d4 d5 25 88 29 aa |........|....%.).|
|00000f30| 8b d1 0e 12 0e 13 0e 0d | d4 d5 25 88 0e 16 ab 86 |........|..%.....|
|00000f40| 0e 12 0e 13 7c 88 d7 d8 | 0e 19 0e 0d 0e 1a 0e 1b |....|...|........|
|00000f50| 0e 1c 26 06 2a 87 22 20 | 5b 73 79 73 74 65 6d 2d |..&.*." |[system-|
|00000f60| 74 79 70 65 20 76 61 78 | 2d 76 6d 73 20 6d 61 6b |type vax|-vms mak|
|00000f70| 65 2d 74 65 6d 70 2d 6e | 61 6d 65 20 22 74 6d 70 |e-temp-n|ame "tmp|
|00000f80| 3a 65 6d 61 63 73 22 20 | 6d 73 2d 64 6f 73 20 77 |:emacs" |ms-dos w|
|00000f90| 69 6e 64 6f 77 73 2d 6e | 74 20 66 69 6c 65 2d 6e |indows-n|t file-n|
|00000fa0| 61 6d 65 2d 61 73 2d 64 | 69 72 65 63 74 6f 72 79 |ame-as-d|irectory|
|00000fb0| 20 67 65 74 65 6e 76 20 | 22 54 4d 50 22 20 22 54 | getenv |"TMP" "T|
|00000fc0| 45 4d 50 22 20 22 22 20 | 22 65 6d 22 20 22 2f 74 |EMP" "" |"em" "/t|
|00000fd0| 6d 70 2f 65 6d 61 63 73 | 22 20 74 65 6d 70 20 28 |mp/emacs|" temp (|
|00000fe0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 c1 c2 8f |(byte-co|de "....|
|00000ff0| 87 22 20 5b 6e 69 6c 20 | 28 64 65 6c 65 74 65 2d |." [nil |(delete-|
|00001000| 66 69 6c 65 20 74 65 6d | 70 29 20 28 28 66 69 6c |file tem|p) ((fil|
|00001010| 65 2d 65 72 72 6f 72 29 | 29 5d 20 33 29 29 20 62 |e-error)|)] 3)) b|
|00001020| 69 6e 61 72 79 2d 70 72 | 6f 63 65 73 73 2d 6f 75 |inary-pr|ocess-ou|
|00001030| 74 70 75 74 20 62 75 66 | 66 65 72 2d 66 69 6c 65 |tput buf|fer-file|
|00001040| 2d 74 79 70 65 20 77 72 | 69 74 65 2d 72 65 67 69 |-type wr|ite-regi|
|00001050| 6f 6e 20 73 74 61 72 74 | 20 65 6e 64 20 6e 69 6c |on start| end nil|
|00001060| 20 73 69 6c 65 6e 74 20 | 64 65 6c 65 74 65 70 20 | silent |deletep |
|00001070| 61 70 70 6c 79 20 63 61 | 6c 6c 2d 70 72 6f 63 65 |apply ca|ll-proce|
|00001080| 73 73 20 70 72 6f 67 72 | 61 6d 20 62 75 66 66 65 |ss progr|am buffe|
|00001090| 72 20 64 69 73 70 6c 61 | 79 70 20 61 72 67 73 5d |r displa|yp args]|
|000010a0| 20 37 20 28 23 24 20 2e | 20 32 37 34 30 29 5d 29 | 7 (#$ .| 2740)])|
|000010b0| 0a 23 40 39 39 31 20 45 | 78 65 63 75 74 65 20 73 |.#@991 E|xecute s|
|000010c0| 74 72 69 6e 67 20 43 4f | 4d 4d 41 4e 44 20 69 6e |tring CO|MMAND in|
|000010d0| 20 69 6e 66 65 72 69 6f | 72 20 73 68 65 6c 6c 3b | inferio|r shell;|
|000010e0| 20 64 69 73 70 6c 61 79 | 20 6f 75 74 70 75 74 2c | display| output,|
|000010f0| 20 69 66 20 61 6e 79 2e | 0a 0a 49 66 20 43 4f 4d | if any.|..If COM|
|00001100| 4d 41 4e 44 20 65 6e 64 | 73 20 69 6e 20 61 6d 70 |MAND end|s in amp|
|00001110| 65 72 73 61 6e 64 2c 20 | 65 78 65 63 75 74 65 20 |ersand, |execute |
|00001120| 69 74 20 61 73 79 6e 63 | 68 72 6f 6e 6f 75 73 6c |it async|hronousl|
|00001130| 79 2e 0a 54 68 65 20 6f | 75 74 70 75 74 20 61 70 |y..The o|utput ap|
|00001140| 70 65 61 72 73 20 69 6e | 20 74 68 65 20 62 75 66 |pears in| the buf|
|00001150| 66 65 72 20 60 2a 41 73 | 79 6e 63 20 53 68 65 6c |fer `*As|ync Shel|
|00001160| 6c 20 43 6f 6d 6d 61 6e | 64 2a 27 2e 0a 54 68 61 |l Comman|d*'..Tha|
|00001170| 74 20 62 75 66 66 65 72 | 20 69 73 20 69 6e 20 73 |t buffer| is in s|
|00001180| 68 65 6c 6c 20 6d 6f 64 | 65 2e 0a 0a 4f 74 68 65 |hell mod|e...Othe|
|00001190| 72 77 69 73 65 2c 20 43 | 4f 4d 4d 41 4e 44 20 69 |rwise, C|OMMAND i|
|000011a0| 73 20 65 78 65 63 75 74 | 65 64 20 73 79 6e 63 68 |s execut|ed synch|
|000011b0| 72 6f 6e 6f 75 73 6c 79 | 2e 20 20 54 68 65 20 6f |ronously|. The o|
|000011c0| 75 74 70 75 74 20 61 70 | 70 65 61 72 73 20 69 6e |utput ap|pears in|
|000011d0| 20 74 68 65 0a 62 75 66 | 66 65 72 20 60 2a 53 68 | the.buf|fer `*Sh|
|000011e0| 65 6c 6c 20 43 6f 6d 6d | 61 6e 64 20 4f 75 74 70 |ell Comm|and Outp|
|000011f0| 75 74 2a 27 2e 0a 49 66 | 20 74 68 65 20 6f 75 74 |ut*'..If| the out|
|00001200| 70 75 74 20 69 73 20 6f | 6e 65 20 6c 69 6e 65 2c |put is o|ne line,|
|00001210| 20 69 74 20 69 73 20 64 | 69 73 70 6c 61 79 65 64 | it is d|isplayed|
|00001220| 20 69 6e 20 74 68 65 20 | 65 63 68 6f 20 61 72 65 | in the |echo are|
|00001230| 61 20 2a 61 73 20 77 65 | 6c 6c 2a 2c 0a 62 75 74 |a *as we|ll*,.but|
|00001240| 20 69 74 20 69 73 20 6e | 6f 6e 65 74 68 65 6c 65 | it is n|onethele|
|00001250| 73 73 20 61 76 61 69 6c | 61 62 6c 65 20 69 6e 20 |ss avail|able in |
|00001260| 62 75 66 66 65 72 20 60 | 2a 53 68 65 6c 6c 20 43 |buffer `|*Shell C|
|00001270| 6f 6d 6d 61 6e 64 20 4f | 75 74 70 75 74 2a 27 2c |ommand O|utput*',|
|00001280| 0a 65 76 65 6e 20 74 68 | 6f 75 67 68 20 74 68 61 |.even th|ough tha|
|00001290| 74 20 62 75 66 66 65 72 | 20 69 73 20 6e 6f 74 20 |t buffer| is not |
|000012a0| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 20 64 69 |automati|cally di|
|000012b0| 73 70 6c 61 79 65 64 2e | 0a 49 66 20 74 68 65 72 |splayed.|.If ther|
|000012c0| 65 20 69 73 20 6e 6f 20 | 6f 75 74 70 75 74 2c 20 |e is no |output, |
|000012d0| 6f 72 20 69 66 20 6f 75 | 74 70 75 74 20 69 73 20 |or if ou|tput is |
|000012e0| 69 6e 73 65 72 74 65 64 | 20 69 6e 20 74 68 65 20 |inserted| in the |
|000012f0| 63 75 72 72 65 6e 74 20 | 62 75 66 66 65 72 2c 0a |current |buffer,.|
|00001300| 74 68 65 6e 20 60 2a 53 | 68 65 6c 6c 20 43 6f 6d |then `*S|hell Com|
|00001310| 6d 61 6e 64 20 4f 75 74 | 70 75 74 2a 27 20 69 73 |mand Out|put*' is|
|00001320| 20 64 65 6c 65 74 65 64 | 2e 0a 0a 54 68 65 20 6f | deleted|...The o|
|00001330| 70 74 69 6f 6e 61 6c 20 | 73 65 63 6f 6e 64 20 61 |ptional |second a|
|00001340| 72 67 75 6d 65 6e 74 20 | 4f 55 54 50 55 54 2d 42 |rgument |OUTPUT-B|
|00001350| 55 46 46 45 52 2c 20 69 | 66 20 6e 6f 6e 2d 6e 69 |UFFER, i|f non-ni|
|00001360| 6c 2c 0a 73 61 79 73 20 | 74 6f 20 70 75 74 20 74 |l,.says |to put t|
|00001370| 68 65 20 6f 75 74 70 75 | 74 20 69 6e 20 73 6f 6d |he outpu|t in som|
|00001380| 65 20 6f 74 68 65 72 20 | 62 75 66 66 65 72 2e 0a |e other |buffer..|
|00001390| 49 66 20 4f 55 54 50 55 | 54 2d 42 55 46 46 45 52 |If OUTPU|T-BUFFER|
|000013a0| 20 69 73 20 61 20 62 75 | 66 66 65 72 20 6f 72 20 | is a bu|ffer or |
|000013b0| 62 75 66 66 65 72 20 6e | 61 6d 65 2c 20 70 75 74 |buffer n|ame, put|
|000013c0| 20 74 68 65 20 6f 75 74 | 70 75 74 20 74 68 65 72 | the out|put ther|
|000013d0| 65 2e 0a 49 66 20 4f 55 | 54 50 55 54 2d 42 55 46 |e..If OU|TPUT-BUF|
|000013e0| 46 45 52 20 69 73 20 6e | 6f 74 20 61 20 62 75 66 |FER is n|ot a buf|
|000013f0| 66 65 72 20 61 6e 64 20 | 6e 6f 74 20 6e 69 6c 2c |fer and |not nil,|
|00001400| 0a 69 6e 73 65 72 74 20 | 6f 75 74 70 75 74 20 69 |.insert |output i|
|00001410| 6e 20 63 75 72 72 65 6e | 74 20 62 75 66 66 65 72 |n curren|t buffer|
|00001420| 2e 20 20 28 54 68 69 73 | 20 63 61 6e 6e 6f 74 20 |. (This| cannot |
|00001430| 62 65 20 64 6f 6e 65 20 | 61 73 79 6e 63 68 72 6f |be done |asynchro|
|00001440| 6e 6f 75 73 6c 79 2e 29 | 0a 49 6e 20 65 69 74 68 |nously.)|.In eith|
|00001450| 65 72 20 63 61 73 65 2c | 20 74 68 65 20 6f 75 74 |er case,| the out|
|00001460| 70 75 74 20 69 73 20 69 | 6e 73 65 72 74 65 64 20 |put is i|nserted |
|00001470| 61 66 74 65 72 20 70 6f | 69 6e 74 20 28 6c 65 61 |after po|int (lea|
|00001480| 76 69 6e 67 20 6d 61 72 | 6b 20 61 66 74 65 72 20 |ving mar|k after |
|00001490| 69 74 29 2e 1f 0a 28 64 | 65 66 61 6c 69 61 73 20 |it)...(d|efalias |
|000014a0| 27 73 68 65 6c 6c 2d 63 | 6f 6d 6d 61 6e 64 20 23 |'shell-c|ommand #|
|000014b0| 5b 28 63 6f 6d 6d 61 6e | 64 20 26 6f 70 74 69 6f |[(comman|d &optio|
|000014c0| 6e 61 6c 20 6f 75 74 70 | 75 74 2d 62 75 66 66 65 |nal outp|ut-buffe|
|000014d0| 72 29 20 22 08 ab 9f c1 | 08 21 ac 9a 08 3b ac 96 |r) "....|.!...;..|
|000014e0| c2 20 88 c3 20 88 c4 0d | c6 c7 c6 0e 08 0e 09 26 |. .. ...|.......&|
|000014f0| 06 88 ca c7 21 87 cb 20 | 1e 0c cd 8e ce cf 0e 09 |....!.. |........|
|00001500| 5c 22 ab 8a d0 0e 09 d1 | 89 94 4f 21 aa 87 d2 60 |\"......|..O!...`|
|00001510| 60 0e 09 08 24 2a 87 22 | 20 5b 6f 75 74 70 75 74 |`...$*."| [output|
|00001520| 2d 62 75 66 66 65 72 20 | 62 75 66 66 65 72 70 20 |-buffer |bufferp |
|00001530| 62 61 72 66 2d 69 66 2d | 62 75 66 66 65 72 2d 72 |barf-if-|buffer-r|
|00001540| 65 61 64 2d 6f 6e 6c 79 | 20 70 75 73 68 2d 6d 61 |ead-only| push-ma|
|00001550| 72 6b 20 63 61 6c 6c 2d | 70 72 6f 63 65 73 73 20 |rk call-|process |
|00001560| 73 68 65 6c 6c 2d 66 69 | 6c 65 2d 6e 61 6d 65 20 |shell-fi|le-name |
|00001570| 6e 69 6c 20 74 20 73 68 | 65 6c 6c 2d 63 6f 6d 6d |nil t sh|ell-comm|
|00001580| 61 6e 64 2d 73 77 69 74 | 63 68 20 63 6f 6d 6d 61 |and-swit|ch comma|
|00001590| 6e 64 20 65 78 63 68 61 | 6e 67 65 2d 70 6f 69 6e |nd excha|nge-poin|
|000015a0| 74 2d 61 6e 64 2d 6d 61 | 72 6b 20 6d 61 74 63 68 |t-and-ma|rk match|
|000015b0| 2d 64 61 74 61 20 6d 61 | 74 63 68 2d 64 61 74 61 |-data ma|tch-data|
|000015c0| 20 28 28 73 74 6f 72 65 | 2d 6d 61 74 63 68 2d 64 | ((store|-match-d|
|000015d0| 61 74 61 20 6d 61 74 63 | 68 2d 64 61 74 61 29 29 |ata matc|h-data))|
|000015e0| 20 73 74 72 69 6e 67 2d | 6d 61 74 63 68 20 22 5b | string-|match "[|
|000015f0| 20 09 5d 2a 26 5b 20 09 | 5d 2a 24 22 20 62 61 63 | .]*&[ .|]*$" bac|
|00001600| 6b 67 72 6f 75 6e 64 20 | 30 20 73 68 65 6c 6c 2d |kground |0 shell-|
|00001610| 63 6f 6d 6d 61 6e 64 2d | 6f 6e 2d 72 65 67 69 6f |command-|on-regio|
|00001620| 6e 5d 20 37 20 28 23 24 | 20 2e 20 34 32 37 39 29 |n] 7 (#$| . 4279)|
|00001630| 20 28 6c 69 73 74 20 28 | 72 65 61 64 2d 73 68 65 | (list (|read-she|
|00001640| 6c 6c 2d 63 6f 6d 6d 61 | 6e 64 20 22 53 68 65 6c |ll-comma|nd "Shel|
|00001650| 6c 20 63 6f 6d 6d 61 6e | 64 3a 20 22 29 20 63 75 |l comman|d: ") cu|
|00001660| 72 72 65 6e 74 2d 70 72 | 65 66 69 78 2d 61 72 67 |rrent-pr|efix-arg|
|00001670| 29 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 73 |)]).(def|alias 's|
|00001680| 68 65 6c 6c 2d 63 6f 6d | 6d 61 6e 64 2d 73 65 6e |hell-com|mand-sen|
|00001690| 74 69 6e 65 6c 20 23 5b | 28 70 72 6f 63 65 73 73 |tinel #[|(process|
|000016a0| 20 73 69 67 6e 61 6c 29 | 20 22 c0 09 21 c2 73 ad | signal)| "..!.s.|
|000016b0| 8e c3 c4 c5 09 21 41 41 | 40 0e 06 c7 c8 4f 23 87 |.....!AA|@....O#.|
|000016c0| 22 20 5b 70 72 6f 63 65 | 73 73 2d 73 74 61 74 75 |" [proce|ss-statu|
|000016d0| 73 20 70 72 6f 63 65 73 | 73 20 28 65 78 69 74 20 |s proces|s (exit |
|000016e0| 73 69 67 6e 61 6c 29 20 | 6d 65 73 73 61 67 65 20 |signal) |message |
|000016f0| 22 25 73 3a 20 25 73 2e | 22 20 70 72 6f 63 65 73 |"%s: %s.|" proces|
|00001700| 73 2d 63 6f 6d 6d 61 6e | 64 20 73 69 67 6e 61 6c |s-comman|d signal|
|00001710| 20 30 20 2d 31 5d 20 36 | 5d 29 0a 23 40 31 30 31 | 0 -1] 6|]).#@101|
|00001720| 37 20 45 78 65 63 75 74 | 65 20 73 74 72 69 6e 67 |7 Execut|e string|
|00001730| 20 43 4f 4d 4d 41 4e 44 | 20 69 6e 20 69 6e 66 65 | COMMAND| in infe|
|00001740| 72 69 6f 72 20 73 68 65 | 6c 6c 20 77 69 74 68 20 |rior she|ll with |
|00001750| 72 65 67 69 6f 6e 20 61 | 73 20 69 6e 70 75 74 2e |region a|s input.|
|00001760| 0a 4e 6f 72 6d 61 6c 6c | 79 20 64 69 73 70 6c 61 |.Normall|y displa|
|00001770| 79 20 6f 75 74 70 75 74 | 20 28 69 66 20 61 6e 79 |y output| (if any|
|00001780| 29 20 69 6e 20 74 65 6d | 70 20 62 75 66 66 65 72 |) in tem|p buffer|
|00001790| 20 60 2a 53 68 65 6c 6c | 20 43 6f 6d 6d 61 6e 64 | `*Shell| Command|
|000017a0| 20 4f 75 74 70 75 74 2a | 27 3b 0a 50 72 65 66 69 | Output*|';.Prefi|
|000017b0| 78 20 61 72 67 20 6d 65 | 61 6e 73 20 72 65 70 6c |x arg me|ans repl|
|000017c0| 61 63 65 20 74 68 65 20 | 72 65 67 69 6f 6e 20 77 |ace the |region w|
|000017d0| 69 74 68 20 69 74 2e 0a | 0a 54 68 65 20 6e 6f 6e |ith it..|.The non|
|000017e0| 69 6e 74 65 72 61 63 74 | 69 76 65 20 61 72 67 75 |interact|ive argu|
|000017f0| 6d 65 6e 74 73 20 61 72 | 65 20 53 54 41 52 54 2c |ments ar|e START,|
|00001800| 20 45 4e 44 2c 20 43 4f | 4d 4d 41 4e 44 2c 20 4f | END, CO|MMAND, O|
|00001810| 55 54 50 55 54 2d 42 55 | 46 46 45 52 2c 20 52 45 |UTPUT-BU|FFER, RE|
|00001820| 50 4c 41 43 45 2e 0a 49 | 66 20 52 45 50 4c 41 43 |PLACE..I|f REPLAC|
|00001830| 45 20 69 73 20 6e 6f 6e | 2d 6e 69 6c 2c 20 74 68 |E is non|-nil, th|
|00001840| 61 74 20 6d 65 61 6e 73 | 20 69 6e 73 65 72 74 20 |at means| insert |
|00001850| 74 68 65 20 6f 75 74 70 | 75 74 0a 69 6e 20 70 6c |the outp|ut.in pl|
|00001860| 61 63 65 20 6f 66 20 74 | 65 78 74 20 66 72 6f 6d |ace of t|ext from|
|00001870| 20 53 54 41 52 54 20 74 | 6f 20 45 4e 44 2c 20 70 | START t|o END, p|
|00001880| 75 74 74 69 6e 67 20 70 | 6f 69 6e 74 20 61 6e 64 |utting p|oint and|
|00001890| 20 6d 61 72 6b 20 61 72 | 6f 75 6e 64 20 69 74 2e | mark ar|ound it.|
|000018a0| 0a 0a 49 66 20 74 68 65 | 20 6f 75 74 70 75 74 20 |..If the| output |
|000018b0| 69 73 20 6f 6e 65 20 6c | 69 6e 65 2c 20 69 74 20 |is one l|ine, it |
|000018c0| 69 73 20 64 69 73 70 6c | 61 79 65 64 20 69 6e 20 |is displ|ayed in |
|000018d0| 74 68 65 20 65 63 68 6f | 20 61 72 65 61 2c 0a 62 |the echo| area,.b|
|000018e0| 75 74 20 69 74 20 69 73 | 20 6e 6f 6e 65 74 68 65 |ut it is| nonethe|
|000018f0| 6c 65 73 73 20 61 76 61 | 69 6c 61 62 6c 65 20 69 |less ava|ilable i|
|00001900| 6e 20 62 75 66 66 65 72 | 20 60 2a 53 68 65 6c 6c |n buffer| `*Shell|
|00001910| 20 43 6f 6d 6d 61 6e 64 | 20 4f 75 74 70 75 74 2a | Command| Output*|
|00001920| 27 0a 65 76 65 6e 20 74 | 68 6f 75 67 68 20 74 68 |'.even t|hough th|
|00001930| 61 74 20 62 75 66 66 65 | 72 20 69 73 20 6e 6f 74 |at buffe|r is not|
|00001940| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 20 64 | automat|ically d|
|00001950| 69 73 70 6c 61 79 65 64 | 2e 0a 49 66 20 74 68 65 |isplayed|..If the|
|00001960| 72 65 20 69 73 20 6e 6f | 20 6f 75 74 70 75 74 2c |re is no| output,|
|00001970| 20 6f 72 20 69 66 20 6f | 75 74 70 75 74 20 69 73 | or if o|utput is|
|00001980| 20 69 6e 73 65 72 74 65 | 64 20 69 6e 20 74 68 65 | inserte|d in the|
|00001990| 20 63 75 72 72 65 6e 74 | 20 62 75 66 66 65 72 2c | current| buffer,|
|000019a0| 0a 74 68 65 6e 20 60 2a | 53 68 65 6c 6c 20 43 6f |.then `*|Shell Co|
|000019b0| 6d 6d 61 6e 64 20 4f 75 | 74 70 75 74 2a 27 20 69 |mmand Ou|tput*' i|
|000019c0| 73 20 64 65 6c 65 74 65 | 64 2e 0a 0a 49 66 20 74 |s delete|d...If t|
|000019d0| 68 65 20 6f 70 74 69 6f | 6e 61 6c 20 66 6f 75 72 |he optio|nal four|
|000019e0| 74 68 20 61 72 67 75 6d | 65 6e 74 20 4f 55 54 50 |th argum|ent OUTP|
|000019f0| 55 54 2d 42 55 46 46 45 | 52 20 69 73 20 6e 6f 6e |UT-BUFFE|R is non|
|00001a00| 2d 6e 69 6c 2c 0a 74 68 | 61 74 20 73 61 79 73 20 |-nil,.th|at says |
|00001a10| 74 6f 20 70 75 74 20 74 | 68 65 20 6f 75 74 70 75 |to put t|he outpu|
|00001a20| 74 20 69 6e 20 73 6f 6d | 65 20 6f 74 68 65 72 20 |t in som|e other |
|00001a30| 62 75 66 66 65 72 2e 0a | 49 66 20 4f 55 54 50 55 |buffer..|If OUTPU|
|00001a40| 54 2d 42 55 46 46 45 52 | 20 69 73 20 61 20 62 75 |T-BUFFER| is a bu|
|00001a50| 66 66 65 72 20 6f 72 20 | 62 75 66 66 65 72 20 6e |ffer or |buffer n|
|00001a60| 61 6d 65 2c 20 70 75 74 | 20 74 68 65 20 6f 75 74 |ame, put| the out|
|00001a70| 70 75 74 20 74 68 65 72 | 65 2e 0a 49 66 20 4f 55 |put ther|e..If OU|
|00001a80| 54 50 55 54 2d 42 55 46 | 46 45 52 20 69 73 20 6e |TPUT-BUF|FER is n|
|00001a90| 6f 74 20 61 20 62 75 66 | 66 65 72 20 61 6e 64 20 |ot a buf|fer and |
|00001aa0| 6e 6f 74 20 6e 69 6c 2c | 0a 69 6e 73 65 72 74 20 |not nil,|.insert |
|00001ab0| 6f 75 74 70 75 74 20 69 | 6e 20 74 68 65 20 63 75 |output i|n the cu|
|00001ac0| 72 72 65 6e 74 20 62 75 | 66 66 65 72 2e 0a 49 6e |rrent bu|ffer..In|
|00001ad0| 20 65 69 74 68 65 72 20 | 63 61 73 65 2c 20 74 68 | either |case, th|
|00001ae0| 65 20 6f 75 74 70 75 74 | 20 69 73 20 69 6e 73 65 |e output| is inse|
|00001af0| 72 74 65 64 20 61 66 74 | 65 72 20 70 6f 69 6e 74 |rted aft|er point|
|00001b00| 20 28 6c 65 61 76 69 6e | 67 20 6d 61 72 6b 20 61 | (leavin|g mark a|
|00001b10| 66 74 65 72 20 69 74 29 | 2e 1f 0a 28 64 65 66 61 |fter it)|...(defa|
|00001b20| 6c 69 61 73 20 27 73 68 | 65 6c 6c 2d 63 6f 6d 6d |lias 'sh|ell-comm|
|00001b30| 61 6e 64 2d 6f 6e 2d 72 | 65 67 69 6f 6e 20 23 5b |and-on-r|egion #[|
|00001b40| 28 73 74 61 72 74 20 65 | 6e 64 20 63 6f 6d 6d 61 |(start e|nd comma|
|00001b50| 6e 64 20 26 6f 70 74 69 | 6f 6e 61 6c 20 6f 75 74 |nd &opti|onal out|
|00001b60| 70 75 74 2d 62 75 66 66 | 65 72 20 72 65 70 6c 61 |put-buff|er repla|
|00001b70| 63 65 29 20 22 08 ac 8c | 09 ab c7 c2 09 21 ac c2 |ce) "...|.....!..|
|00001b80| 09 3b ac be 08 ad 83 0b | 0c 57 1d 0b 62 88 08 ab |.;......|.W..b...|
|00001b90| 83 c6 20 88 c7 0b 0c 0e | 08 c9 89 ca 0e 0b 0e 0c |.. .....|........|
|00001ba0| 26 08 88 cd ce 21 89 1e | 0f ab 8b 0e 0f 70 61 ac |&....!..|.....pa.|
|00001bb0| 85 d0 0e 0f 21 88 29 08 | ad 86 0d ad 83 d1 c9 21 |....!.).|.......!|
|00001bc0| 29 87 d2 09 ae 81 ce 21 | ca 0e 13 1e 14 1e 15 1e |)......!|........|
|00001bd0| 16 d7 8e 0e 16 70 61 ab | a4 ca 16 18 0b 0c 5d 64 |.....pa.|......]d|
|00001be0| 7c 88 65 0b 0c 5d 7c 88 | c7 65 64 0e 08 c9 89 ca ||.e..]|.|.ed.....|
|00001bf0| 0e 0b 0e 0c 26 08 88 c9 | 89 16 15 aa a4 8a 0e 16 |....&...|........|
|00001c00| 71 88 ca 16 18 0e 14 16 | 13 d9 20 88 29 c7 0b 0c |q.......|.. .)...|
|00001c10| 0e 08 ca 0e 16 ca 0e 0b | 0e 0c 26 08 88 c9 89 16 |........|..&.....|
|00001c20| 15 2c 87 22 20 5b 72 65 | 70 6c 61 63 65 20 6f 75 |.,." [re|place ou|
|00001c30| 74 70 75 74 2d 62 75 66 | 66 65 72 20 62 75 66 66 |tput-buf|fer buff|
|00001c40| 65 72 70 20 73 74 61 72 | 74 20 65 6e 64 20 73 77 |erp star|t end sw|
|00001c50| 61 70 20 70 75 73 68 2d | 6d 61 72 6b 20 63 61 6c |ap push-|mark cal|
|00001c60| 6c 2d 70 72 6f 63 65 73 | 73 2d 72 65 67 69 6f 6e |l-proces|s-region|
|00001c70| 20 73 68 65 6c 6c 2d 66 | 69 6c 65 2d 6e 61 6d 65 | shell-f|ile-name|
|00001c80| 20 74 20 6e 69 6c 20 73 | 68 65 6c 6c 2d 63 6f 6d | t nil s|hell-com|
|00001c90| 6d 61 6e 64 2d 73 77 69 | 74 63 68 20 63 6f 6d 6d |mand-swi|tch comm|
|00001ca0| 61 6e 64 20 67 65 74 2d | 62 75 66 66 65 72 20 22 |and get-|buffer "|
|00001cb0| 2a 53 68 65 6c 6c 20 43 | 6f 6d 6d 61 6e 64 20 4f |*Shell C|ommand O|
|00001cc0| 75 74 70 75 74 2a 22 20 | 73 68 65 6c 6c 2d 62 75 |utput*" |shell-bu|
|00001cd0| 66 66 65 72 20 6b 69 6c | 6c 2d 62 75 66 66 65 72 |ffer kil|l-buffer|
|00001ce0| 20 65 78 63 68 61 6e 67 | 65 2d 70 6f 69 6e 74 2d | exchang|e-point-|
|00001cf0| 61 6e 64 2d 6d 61 72 6b | 20 67 65 74 2d 62 75 66 |and-mark| get-buf|
|00001d00| 66 65 72 2d 63 72 65 61 | 74 65 20 64 65 66 61 75 |fer-crea|te defau|
|00001d10| 6c 74 2d 64 69 72 65 63 | 74 6f 72 79 20 64 69 72 |lt-direc|tory dir|
|00001d20| 65 63 74 6f 72 79 20 73 | 75 63 63 65 73 73 20 62 |ectory s|uccess b|
|00001d30| 75 66 66 65 72 20 28 28 | 62 79 74 65 2d 63 6f 64 |uffer ((|byte-cod|
|00001d40| 65 20 22 8a 08 71 88 c1 | 20 c2 55 ab 83 c2 aa 84 |e "..q..| .U.....|
|00001d50| c3 65 64 5c 22 29 89 1c | c2 55 ab 8e 0d ab 85 c6 |.ed\")..|.U......|
|00001d60| c7 c8 5c 22 88 c9 08 21 | 88 aa a3 0d ab 99 0c ca |..\"...!|........|
|00001d70| 55 ab 94 cb cc 8a 08 71 | 88 65 62 88 60 cd 7f 88 |U......q|.eb.`...|
|00001d80| 60 7b 29 5c 22 88 aa 87 | ce cf 08 21 ca 5c 22 88 |`{)\"...|...!.\".|
|00001d90| 29 cd 87 22 20 5b 62 75 | 66 66 65 72 20 62 75 66 |).." [bu|ffer buf|
|00001da0| 66 65 72 2d 73 69 7a 65 | 20 30 20 63 6f 75 6e 74 |fer-size| 0 count|
|00001db0| 2d 6c 69 6e 65 73 20 6c | 69 6e 65 73 20 73 75 63 |-lines l|ines suc|
|00001dc0| 63 65 73 73 20 64 69 73 | 70 6c 61 79 2d 6d 65 73 |cess dis|play-mes|
|00001dd0| 73 61 67 65 20 63 6f 6d | 6d 61 6e 64 20 22 28 53 |sage com|mand "(S|
|00001de0| 68 65 6c 6c 20 63 6f 6d | 6d 61 6e 64 20 63 6f 6d |hell com|mand com|
|00001df0| 70 6c 65 74 65 64 20 77 | 69 74 68 20 6e 6f 20 6f |pleted w|ith no o|
|00001e00| 75 74 70 75 74 29 22 20 | 6b 69 6c 6c 2d 62 75 66 |utput)" |kill-buf|
|00001e10| 66 65 72 20 31 20 6d 65 | 73 73 61 67 65 20 22 25 |fer 1 me|ssage "%|
|00001e20| 73 22 20 6e 69 6c 20 73 | 65 74 2d 77 69 6e 64 6f |s" nil s|et-windo|
|00001e30| 77 2d 73 74 61 72 74 20 | 64 69 73 70 6c 61 79 2d |w-start |display-|
|00001e40| 62 75 66 66 65 72 5d 20 | 35 29 29 20 62 75 66 66 |buffer] |5)) buff|
|00001e50| 65 72 2d 72 65 61 64 2d | 6f 6e 6c 79 20 65 72 61 |er-read-|only era|
|00001e60| 73 65 2d 62 75 66 66 65 | 72 5d 20 31 30 20 28 23 |se-buffe|r] 10 (#|
|00001e70| 24 20 2e 20 35 39 32 32 | 29 20 28 6c 65 74 20 28 |$ . 5922|) (let (|
|00001e80| 28 73 74 72 69 6e 67 20 | 28 72 65 61 64 2d 73 68 |(string |(read-sh|
|00001e90| 65 6c 6c 2d 63 6f 6d 6d | 61 6e 64 20 22 53 68 65 |ell-comm|and "She|
|00001ea0| 6c 6c 20 63 6f 6d 6d 61 | 6e 64 20 6f 6e 20 72 65 |ll comma|nd on re|
|00001eb0| 67 69 6f 6e 3a 20 22 29 | 29 29 20 28 6c 69 73 74 |gion: ")|)) (list|
|00001ec0| 20 28 72 65 67 69 6f 6e | 2d 62 65 67 69 6e 6e 69 | (region|-beginni|
|00001ed0| 6e 67 29 20 28 72 65 67 | 69 6f 6e 2d 65 6e 64 29 |ng) (reg|ion-end)|
|00001ee0| 20 73 74 72 69 6e 67 20 | 63 75 72 72 65 6e 74 2d | string |current-|
|00001ef0| 70 72 65 66 69 78 2d 61 | 72 67 20 63 75 72 72 65 |prefix-a|rg curre|
|00001f00| 6e 74 2d 70 72 65 66 69 | 78 2d 61 72 67 29 29 5d |nt-prefi|x-arg))]|
|00001f10| 29 0a 23 40 36 39 35 20 | 53 74 61 72 74 20 61 20 |).#@695 |Start a |
|00001f20| 70 72 6f 67 72 61 6d 20 | 69 6e 20 61 20 73 75 62 |program |in a sub|
|00001f30| 70 72 6f 63 65 73 73 2e | 20 20 52 65 74 75 72 6e |process.| Return|
|00001f40| 20 74 68 65 20 70 72 6f | 63 65 73 73 20 6f 62 6a | the pro|cess obj|
|00001f50| 65 63 74 20 66 6f 72 20 | 69 74 2e 0a 41 72 67 73 |ect for |it..Args|
|00001f60| 20 61 72 65 20 4e 41 4d | 45 20 42 55 46 46 45 52 | are NAM|E BUFFER|
|00001f70| 20 50 52 4f 47 52 41 4d | 20 26 72 65 73 74 20 50 | PROGRAM| &rest P|
|00001f80| 52 4f 47 52 41 4d 2d 41 | 52 47 53 0a 4e 41 4d 45 |ROGRAM-A|RGS.NAME|
|00001f90| 20 69 73 20 6e 61 6d 65 | 20 66 6f 72 20 70 72 6f | is name| for pro|
|00001fa0| 63 65 73 73 2e 20 20 49 | 74 20 69 73 20 6d 6f 64 |cess. I|t is mod|
|00001fb0| 69 66 69 65 64 20 69 66 | 20 6e 65 63 65 73 73 61 |ified if| necessa|
|00001fc0| 72 79 20 74 6f 20 6d 61 | 6b 65 20 69 74 20 75 6e |ry to ma|ke it un|
|00001fd0| 69 71 75 65 2e 0a 42 55 | 46 46 45 52 20 69 73 20 |ique..BU|FFER is |
|00001fe0| 74 68 65 20 62 75 66 66 | 65 72 20 6f 72 20 28 62 |the buff|er or (b|
|00001ff0| 75 66 66 65 72 2d 6e 61 | 6d 65 29 20 74 6f 20 61 |uffer-na|me) to a|
|00002000| 73 73 6f 63 69 61 74 65 | 20 77 69 74 68 20 74 68 |ssociate| with th|
|00002010| 65 20 70 72 6f 63 65 73 | 73 2e 0a 20 50 72 6f 63 |e proces|s.. Proc|
|00002020| 65 73 73 20 6f 75 74 70 | 75 74 20 67 6f 65 73 20 |ess outp|ut goes |
|00002030| 61 74 20 65 6e 64 20 6f | 66 20 74 68 61 74 20 62 |at end o|f that b|
|00002040| 75 66 66 65 72 2c 20 75 | 6e 6c 65 73 73 20 79 6f |uffer, u|nless yo|
|00002050| 75 20 73 70 65 63 69 66 | 79 0a 20 61 6e 20 6f 75 |u specif|y. an ou|
|00002060| 74 70 75 74 20 73 74 72 | 65 61 6d 20 6f 72 20 66 |tput str|eam or f|
|00002070| 69 6c 74 65 72 20 66 75 | 6e 63 74 69 6f 6e 20 74 |ilter fu|nction t|
|00002080| 6f 20 68 61 6e 64 6c 65 | 20 74 68 65 20 6f 75 74 |o handle| the out|
|00002090| 70 75 74 2e 0a 20 42 55 | 46 46 45 52 20 6d 61 79 |put.. BU|FFER may|
|000020a0| 20 62 65 20 61 6c 73 6f | 20 6e 69 6c 2c 20 6d 65 | be also| nil, me|
|000020b0| 61 6e 69 6e 67 20 74 68 | 61 74 20 74 68 69 73 20 |aning th|at this |
|000020c0| 70 72 6f 63 65 73 73 20 | 69 73 20 6e 6f 74 20 61 |process |is not a|
|000020d0| 73 73 6f 63 69 61 74 65 | 64 0a 20 77 69 74 68 20 |ssociate|d. with |
|000020e0| 61 6e 79 20 62 75 66 66 | 65 72 0a 54 68 69 72 64 |any buff|er.Third|
|000020f0| 20 61 72 67 20 69 73 20 | 70 72 6f 67 72 61 6d 20 | arg is |program |
|00002100| 66 69 6c 65 20 6e 61 6d | 65 2e 20 20 49 74 20 69 |file nam|e. It i|
|00002110| 73 20 73 65 61 72 63 68 | 65 64 20 66 6f 72 20 61 |s search|ed for a|
|00002120| 73 20 69 6e 20 74 68 65 | 20 73 68 65 6c 6c 2e 0a |s in the| shell..|
|00002130| 52 65 6d 61 69 6e 69 6e | 67 20 61 72 67 75 6d 65 |Remainin|g argume|
|00002140| 6e 74 73 20 61 72 65 20 | 73 74 72 69 6e 67 73 20 |nts are |strings |
|00002150| 74 6f 20 67 69 76 65 20 | 70 72 6f 67 72 61 6d 20 |to give |program |
|00002160| 61 73 20 61 72 67 75 6d | 65 6e 74 73 2e 0a 49 4e |as argum|ents..IN|
|00002170| 43 4f 44 45 20 61 6e 64 | 20 4f 55 54 43 4f 44 45 |CODE and| OUTCODE|
|00002180| 20 73 70 65 63 69 66 79 | 20 74 68 65 20 63 6f 64 | specify| the cod|
|00002190| 69 6e 67 2d 73 79 73 74 | 65 6d 20 6f 62 6a 65 63 |ing-syst|em objec|
|000021a0| 74 73 20 75 73 65 64 20 | 69 6e 20 69 6e 70 75 74 |ts used |in input|
|000021b0| 2f 6f 75 74 70 75 74 0a | 20 66 72 6f 6d 2f 74 6f |/output.| from/to|
|000021c0| 20 74 68 65 20 70 72 6f | 63 65 73 73 2e 1f 0a 28 | the pro|cess...(|
|000021d0| 64 65 66 61 6c 69 61 73 | 20 27 73 74 61 72 74 2d |defalias| 'start-|
|000021e0| 70 72 6f 63 65 73 73 20 | 23 5b 28 6e 61 6d 65 20 |process |#[(name |
|000021f0| 62 75 66 66 65 72 20 70 | 72 6f 67 72 61 6d 20 26 |buffer p|rogram &|
|00002200| 72 65 73 74 20 70 72 6f | 67 72 61 6d 2d 61 72 67 |rest pro|gram-arg|
|00002210| 73 29 20 22 c0 c1 5c 6e | 0b 0c 0d 25 87 22 20 5b |s) "..\n|...%." [|
|00002220| 61 70 70 6c 79 20 73 74 | 61 72 74 2d 70 72 6f 63 |apply st|art-proc|
|00002230| 65 73 73 2d 69 6e 74 65 | 72 6e 61 6c 20 6e 61 6d |ess-inte|rnal nam|
|00002240| 65 20 62 75 66 66 65 72 | 20 70 72 6f 67 72 61 6d |e buffer| program|
|00002250| 20 70 72 6f 67 72 61 6d | 2d 61 72 67 73 5d 20 36 | program|-args] 6|
|00002260| 20 28 23 24 20 2e 20 37 | 39 36 30 29 5d 29 0a 23 | (#$ . 7|960)]).#|
|00002270| 40 37 33 32 20 4f 70 65 | 6e 20 61 20 54 43 50 20 |@732 Ope|n a TCP |
|00002280| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 66 6f 72 20 61 |connecti|on for a|
|00002290| 20 73 65 72 76 69 63 65 | 20 74 6f 20 61 20 68 6f | service| to a ho|
|000022a0| 73 74 2e 0a 52 65 74 75 | 72 6e 73 20 61 20 73 75 |st..Retu|rns a su|
|000022b0| 62 70 72 6f 63 65 73 73 | 2d 6f 62 6a 65 63 74 20 |bprocess|-object |
|000022c0| 74 6f 20 72 65 70 72 65 | 73 65 6e 74 20 74 68 65 |to repre|sent the|
|000022d0| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 2e 0a 49 6e 70 | connect|ion..Inp|
|000022e0| 75 74 20 61 6e 64 20 6f | 75 74 70 75 74 20 77 6f |ut and o|utput wo|
|000022f0| 72 6b 20 61 73 20 66 6f | 72 20 73 75 62 70 72 6f |rk as fo|r subpro|
|00002300| 63 65 73 73 65 73 3b 20 | 60 64 65 6c 65 74 65 2d |cesses; |`delete-|
|00002310| 70 72 6f 63 65 73 73 27 | 20 63 6c 6f 73 65 73 20 |process'| closes |
|00002320| 69 74 2e 0a 41 72 67 73 | 20 61 72 65 20 4e 41 4d |it..Args| are NAM|
|00002330| 45 20 42 55 46 46 45 52 | 20 48 4f 53 54 20 53 45 |E BUFFER| HOST SE|
|00002340| 52 56 49 43 45 2e 0a 4e | 41 4d 45 20 69 73 20 6e |RVICE..N|AME is n|
|00002350| 61 6d 65 20 66 6f 72 20 | 70 72 6f 63 65 73 73 2e |ame for |process.|
|00002360| 20 20 49 74 20 69 73 20 | 6d 6f 64 69 66 69 65 64 | It is |modified|
|00002370| 20 69 66 20 6e 65 63 65 | 73 73 61 72 79 20 74 6f | if nece|ssary to|
|00002380| 20 6d 61 6b 65 20 69 74 | 20 75 6e 69 71 75 65 2e | make it| unique.|
|00002390| 0a 42 55 46 46 45 52 20 | 69 73 20 74 68 65 20 62 |.BUFFER |is the b|
|000023a0| 75 66 66 65 72 20 28 6f | 72 20 62 75 66 66 65 72 |uffer (o|r buffer|
|000023b0| 2d 6e 61 6d 65 29 20 74 | 6f 20 61 73 73 6f 63 69 |-name) t|o associ|
|000023c0| 61 74 65 20 77 69 74 68 | 20 74 68 65 20 70 72 6f |ate with| the pro|
|000023d0| 63 65 73 73 2e 0a 20 50 | 72 6f 63 65 73 73 20 6f |cess.. P|rocess o|
|000023e0| 75 74 70 75 74 20 67 6f | 65 73 20 61 74 20 65 6e |utput go|es at en|
|000023f0| 64 20 6f 66 20 74 68 61 | 74 20 62 75 66 66 65 72 |d of tha|t buffer|
|00002400| 2c 20 75 6e 6c 65 73 73 | 20 79 6f 75 20 73 70 65 |, unless| you spe|
|00002410| 63 69 66 79 0a 20 61 6e | 20 6f 75 74 70 75 74 20 |cify. an| output |
|00002420| 73 74 72 65 61 6d 20 6f | 72 20 66 69 6c 74 65 72 |stream o|r filter|
|00002430| 20 66 75 6e 63 74 69 6f | 6e 20 74 6f 20 68 61 6e | functio|n to han|
|00002440| 64 6c 65 20 74 68 65 20 | 6f 75 74 70 75 74 2e 0a |dle the |output..|
|00002450| 20 42 55 46 46 45 52 20 | 6d 61 79 20 62 65 20 61 | BUFFER |may be a|
|00002460| 6c 73 6f 20 6e 69 6c 2c | 20 6d 65 61 6e 69 6e 67 |lso nil,| meaning|
|00002470| 20 74 68 61 74 20 74 68 | 69 73 20 70 72 6f 63 65 | that th|is proce|
|00002480| 73 73 20 69 73 20 6e 6f | 74 20 61 73 73 6f 63 69 |ss is no|t associ|
|00002490| 61 74 65 64 0a 20 77 69 | 74 68 20 61 6e 79 20 62 |ated. wi|th any b|
|000024a0| 75 66 66 65 72 0a 54 68 | 69 72 64 20 61 72 67 20 |uffer.Th|ird arg |
|000024b0| 69 73 20 6e 61 6d 65 20 | 6f 66 20 74 68 65 20 68 |is name |of the h|
|000024c0| 6f 73 74 20 74 6f 20 63 | 6f 6e 6e 65 63 74 20 74 |ost to c|onnect t|
|000024d0| 6f 2c 20 6f 72 20 69 74 | 73 20 49 50 20 61 64 64 |o, or it|s IP add|
|000024e0| 72 65 73 73 2e 0a 46 6f | 75 72 74 68 20 61 72 67 |ress..Fo|urth arg|
|000024f0| 20 53 45 52 56 49 43 45 | 20 69 73 20 6e 61 6d 65 | SERVICE| is name|
|00002500| 20 6f 66 20 74 68 65 20 | 73 65 72 76 69 63 65 20 | of the |service |
|00002510| 64 65 73 69 72 65 64 2c | 20 6f 72 20 61 6e 20 69 |desired,| or an i|
|00002520| 6e 74 65 67 65 72 0a 20 | 73 70 65 63 69 66 79 69 |nteger. |specifyi|
|00002530| 6e 67 20 61 20 70 6f 72 | 74 20 6e 75 6d 62 65 72 |ng a por|t number|
|00002540| 20 74 6f 20 63 6f 6e 6e | 65 63 74 20 74 6f 2e 1f | to conn|ect to..|
|00002550| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 6f 70 65 6e |.(defali|as 'open|
|00002560| 2d 6e 65 74 77 6f 72 6b | 2d 73 74 72 65 61 6d 20 |-network|-stream |
|00002570| 23 5b 28 6e 61 6d 65 20 | 62 75 66 66 65 72 20 68 |#[(name |buffer h|
|00002580| 6f 73 74 20 73 65 72 76 | 69 63 65 29 20 22 c0 09 |ost serv|ice) "..|
|00002590| 5c 6e 0b 0c 24 87 22 20 | 5b 6f 70 65 6e 2d 6e 65 |\n..$." |[open-ne|
|000025a0| 74 77 6f 72 6b 2d 73 74 | 72 65 61 6d 2d 69 6e 74 |twork-st|ream-int|
|000025b0| 65 72 6e 61 6c 20 6e 61 | 6d 65 20 62 75 66 66 65 |ernal na|me buffe|
|000025c0| 72 20 68 6f 73 74 20 73 | 65 72 76 69 63 65 5d 20 |r host s|ervice] |
|000025d0| 35 20 28 23 24 20 2e 20 | 38 38 32 31 29 5d 29 0a |5 (#$ . |8821)]).|
|000025e0| 23 40 36 35 20 51 75 6f | 74 65 20 61 6e 20 61 72 |#@65 Quo|te an ar|
|000025f0| 67 75 6d 65 6e 74 20 66 | 6f 72 20 70 61 73 73 69 |gument f|or passi|
|00002600| 6e 67 20 61 73 20 61 72 | 67 75 6d 65 6e 74 20 74 |ng as ar|gument t|
|00002610| 6f 20 61 6e 20 69 6e 66 | 65 72 69 6f 72 20 73 68 |o an inf|erior sh|
|00002620| 65 6c 6c 2e 1f 0a 28 64 | 65 66 61 6c 69 61 73 20 |ell...(d|efalias |
|00002630| 27 73 68 65 6c 6c 2d 71 | 75 6f 74 65 2d 61 72 67 |'shell-q|uote-arg|
|00002640| 75 6d 65 6e 74 20 23 5b | 28 61 72 67 75 6d 65 6e |ument #[|(argumen|
|00002650| 74 29 20 22 08 c1 61 ab | 82 5c 6e 87 08 c3 61 ab |t) "..a.|.\n...a.|
|00002660| 85 c4 5c 6e c4 51 87 c5 | c6 c7 1e 08 1e 09 1e 5c |..\n.Q..|.......\|
|00002670| 6e cb cc 5c 6e 0e 09 23 | ab 9d c6 94 16 08 0e 5c |n..\n..#|.......\|
|00002680| 6e 5c 6e 0e 09 0e 08 4f | cd 5c 6e 0e 08 89 54 4f |n\n....O|.\n...TO|
|00002690| 52 16 5c 6e 0e 08 54 16 | 09 aa 5b 0e 5c 6e 5c 6e |R.\n..T.|..[.\n\n|
|000026a0| 0e 09 c7 4f 50 2b 87 22 | 20 5b 73 79 73 74 65 6d |...OP+."| [system|
|000026b0| 2d 74 79 70 65 20 6d 73 | 2d 64 6f 73 20 61 72 67 |-type ms|-dos arg|
|000026c0| 75 6d 65 6e 74 20 77 69 | 6e 64 6f 77 73 2d 6e 74 |ument wi|ndows-nt|
|000026d0| 20 22 5c 22 22 20 22 22 | 20 30 20 6e 69 6c 20 65 | "\"" ""| 0 nil e|
|000026e0| 6e 64 20 73 74 61 72 74 | 20 72 65 73 75 6c 74 20 |nd start| result |
|000026f0| 73 74 72 69 6e 67 2d 6d | 61 74 63 68 20 22 5b 5e |string-m|atch "[^|
|00002700| 2d 30 2d 39 61 2d 7a 41 | 2d 5a 5f 2e 2f 5d 22 20 |-0-9a-zA|-Z_./]" |
|00002710| 22 5c 5c 22 5d 20 36 20 | 28 23 24 20 2e 20 39 37 |"\\"] 6 |(#$ . 97|
|00002720| 30 31 29 5d 29 0a 23 40 | 39 30 20 45 78 65 63 75 |01)]).#@|90 Execu|
|00002730| 74 65 20 43 4f 4d 4d 41 | 4e 44 20 61 73 20 61 6e |te COMMA|ND as an|
|00002740| 20 65 78 74 65 72 6e 61 | 6c 20 70 72 6f 63 65 73 | externa|l proces|
|00002750| 73 20 61 6e 64 20 72 65 | 74 75 72 6e 20 74 68 65 |s and re|turn the|
|00002760| 20 6f 75 74 70 75 74 20 | 6f 66 20 74 68 61 74 0a | output |of that.|
|00002770| 70 72 6f 63 65 73 73 20 | 61 73 20 61 20 73 74 72 |process |as a str|
|00002780| 69 6e 67 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |ing..(de|falias '|
|00002790| 65 78 65 63 2d 74 6f 2d | 73 74 72 69 6e 67 20 23 |exec-to-|string #|
|000027a0| 5b 28 63 6f 6d 6d 61 6e | 64 29 20 22 72 c0 c1 21 |[(comman|d) "r..!|
|000027b0| 71 88 c2 13 c4 70 21 88 | c5 20 88 70 1e 06 c7 0e |q....p!.|. .p....|
|000027c0| 08 c2 c9 c2 ca 0e 0b 26 | 06 88 29 cc 20 c5 20 88 |.......&|..). . .|
|000027d0| 29 87 22 20 5b 67 65 74 | 2d 62 75 66 66 65 72 2d |)." [get|-buffer-|
|000027e0| 63 72 65 61 74 65 20 22 | 20 2a 73 74 72 69 6e 67 |create "| *string|
|000027f0| 2d 6f 75 74 70 75 74 2a | 22 20 6e 69 6c 20 62 75 |-output*|" nil bu|
|00002800| 66 66 65 72 2d 72 65 61 | 64 2d 6f 6e 6c 79 20 62 |ffer-rea|d-only b|
|00002810| 75 66 66 65 72 2d 64 69 | 73 61 62 6c 65 2d 75 6e |uffer-di|sable-un|
|00002820| 64 6f 20 65 72 61 73 65 | 2d 62 75 66 66 65 72 20 |do erase|-buffer |
|00002830| 73 74 61 6e 64 61 72 64 | 2d 6f 75 74 70 75 74 20 |standard|-output |
|00002840| 63 61 6c 6c 2d 70 72 6f | 63 65 73 73 20 73 68 65 |call-pro|cess she|
|00002850| 6c 6c 2d 66 69 6c 65 2d | 6e 61 6d 65 20 74 20 22 |ll-file-|name t "|
|00002860| 2d 63 22 20 63 6f 6d 6d | 61 6e 64 20 62 75 66 66 |-c" comm|and buff|
|00002870| 65 72 2d 73 74 72 69 6e | 67 5d 20 37 20 28 23 24 |er-strin|g] 7 (#$|
|00002880| 20 2e 20 31 30 30 32 37 | 29 5d 29 0a 28 64 65 66 | . 10027|)]).(def|
|00002890| 61 6c 69 61 73 20 27 73 | 68 65 6c 6c 2d 63 6f 6d |alias 's|hell-com|
|000028a0| 6d 61 6e 64 2d 74 6f 2d | 73 74 72 69 6e 67 20 27 |mand-to-|string '|
|000028b0| 65 78 65 63 2d 74 6f 2d | 73 74 72 69 6e 67 29 0a |exec-to-|string).|
+--------+-------------------------+-------------------------+--------+--------+